<?php

return array(
    //шаблон
     'view_script' => false,

    'jqgrid_category_edit_url' => array(
        'action' => 'ajax-category-switcher'
    ),
    'jqgrid_category_model_url' => array(
        'action' => 'list-category-model'
    ),
    'jqgrid_back_url' => array(
        'action' => 'list-category'
    ),

	'backurl_label' => 'К списку категорий',
	
    'jqgrid_category_navgrid' => array(
        'edit' => true,
		'search' => true
    ),
    'jqgrid_category_navgrid_buttons' => array(
        array(
            'buttonicon' => 'ui-icon-folder-open',
            'caption' => 'Разделы',
            'position' => 'last',
            'onClickHandlerParams' => array(
                'url' => '/catalogue/admin/list-category'
            )
        ),

        array(
            'buttonicon' => 'ui-icon-document',
            'caption' => 'Объекты',
            'position' => 'last',
            'onClickHandlerParams' => array(
                'url' => '/catalogue/admin/list-object'
            )
        ),

        array(
            'buttonicon' => 'ui-icon-document-b',
            'caption' => 'Атрибуты',
            'position' => 'last',
            'onClickHandlerParams' => array(
                'url' => '/catalogue/admin/list-category-attr'
            )
        ),
    ),

    'jqgrid_category_caption' => 'Список',

    'jqgrid_category_col_names' => array(
        'Название', 'Название на сайте', 'Код', 'Тип', 'Популярность', 'Сортировка', 'Активность','ID'
    ),

    'jqgrid_category_col_model' => array(
        0 => array(
            'name' => 'name',
            'index' => 'name',
            'width' => 200,
            'editable' => true,
            'search' => true,
            'editrules' => array(
                'required' => true
            )
        ),
        1 => array(
            'name' => 'display_title',
            'index' => 'display_title',
            'width' => 200,
            'editable' => true,
            'search' => true,
        ),
        2 => array(
            'name' => 'code',
            'index' => 'code',
            'width' => 120,
            'editable' => true,
            'search' => true,
            'editrules' => array(
                'required' => true
            )
        ),
        3 => array(
            'name' => 'type',
            'index' => 'type',
            'width' => 100,
            'editable' => true,
            'edittype' => 'select',
            'formatter' => 'select',
            'editoptions' => array('value' => Catalogue_Model_Category::getTypes('jqgrid', $this->_actionConfig['default_category_types'])),

            'search' => true,
            'stype' => 'select',
            'searchoptions' => array('value' => Catalogue_Model_Category::getTypes('jqgrid', $this->_actionConfig['default_category_types'])),
        ),
        4 => array(
            'name' => 'rating',
            'index' => 'rating',
            'width' => 75,
            'editable' => true,
            'search' => true,
        ),
		5 => array(
            'name' => 'sort',
            'index' => 'sort',
            'width' => 75,
            'editable' => true,
            'search' => true,
        ),
        6 => array(
            'name' => 'status', 'index' => 'status', 'width' => 55, 'sortable' => false,
            'editable' => true,
            'search' => true,
            'stype' => 'select',
            'searchoptions' => array(
                'value' => array(
                    Catalogue_Model_Object_Abstract::ENABLED_STATUS => 'Активный',
                    Catalogue_Model_Object_Abstract::DISABLED_STATUS => 'Скрытый'
                )
            ),
            'edittype' => 'checkbox',
            'formatter' => 'checkbox',
            'editoptions' => array('value' => '1:0'),
            'formatoptions' => array('disabled' => true)
        ),
        7 => array(
            'name' => 'id',
            'index' => 'id',
            'width' => 55,
            'editable' => false,
            'search' => true
        ),
    )
);

?>